<!DOCTYPE html>
<html>
<head>
    <title>修改密码</title>
    <link rel='stylesheet' href='/css/bootstrap.min.css' />
    <link rel='stylesheet' href='/css/reportStyle.css' />
    <script type="text/javascript" src='/js/jquery-1.9.1.min.js'></script>
    <script type="text/javascript" src='/js/bootstrap.min.js'></script>
</head>
<body class="passoword">
<header class="navbar">
    <a class="brand" href="/" title="home page">Daily Report</a>
    <ul class="nav">
        <li><a href="/write">写日报</a></li>
        <li><a href="/show">我的日报</a></li>
        {{#if hasSubordinate}}
        <li><a href="/showsubordinate">下属日报</a></li>
        {{/if}}
        <li class="active"><a href="#">修改密码</a></li>
        {{#if isAdmin}}
        <li><a href="/admin">管理员控制台</a></li>
        {{/if}}
        {{#if isLoginUser}}
        <li><a href="/logout">退出</a></li>
        {{/if}}
    </ul>
</header>
<section class="container">
    <div class="title"> <i class="icon-pencil"></i><h1>修改密码</h1></div>
    <article id="changPassword">
        <label for="oldpassword">原始密码:
            <span data-bind="css:{errorTip: !validOldPassword()}, visible: !validOldPassword()">至少7个，最多25个字符</span></label>
        <input type="password" required="required" name="password" id="oldpassword"
               data-bind="value:oldpassword, valueUpdate:'keyup'"/>

        <label for="newpassword">新密码:
            <span data-bind="css:{errorTip: !validNewPassword()}, visible: !validNewPassword()">至少7个，最多25个字符</span></label>
        <input type="password" required="required" name="password" id="newpassword"
               data-bind="value:newpassword, valueUpdate:'keyup'"/>

        <label for="renewpassword">重复新密码:
            <span data-bind="css:{errorTip: !validRePassword()}, visible: !validRePassword()">两次输入的密码不一致</span></label>
        <input type="password" required="required" name="repassword" id="renewpassword"
               data-bind="value:renewpassword, valueUpdate:'keyup'"/>

        <div><input id="reportSubmitBtn" type="button" value="提交" class="btn btn-primary"
                    data-bind="click:submit, enable:valid()"/></div>
        <p id="successTip">恭喜，修改密码成功！</p>
        <p id="passwordErrorTip">原始密码输入错误！</p>
    </article>
</section>

<script type="text/javascript" src='/js/knockout-2.2.1.js'></script>
<script type="text/javascript" src='/js/admin/DepartmentUserMode.js'></script>
<script type="text/javascript" src='/js/password.js'></script>
</body>
</html>